
var WebSite={
    'baidu':'http://www.baidu.com/s?ie=utf-8&tn=uuola&wd=',
    'google':'https://www.google.com.hk/cse?cx=partner-pub-4349936551126280:7674798150&ie=UTF-8&q=',
    'soso':'http://www.soso.com/q?pid=s.idx&cid=s.idx.se&srclient=uuola&w=',
    'bing':'http://cn.bing.com/search?mkt=zh-CN&qs=n&form=uuola.com&sk=&sc=8-4&pn=default&q=',
    'youdao':'http://www.youdao.com/search?ue=utf8&keyfrom=uuola.com&q=',
    'sogou':'http://www.sogou.com/web?from=uuola.com&query=',
    'jike':'http://www.jike.com/so?from=uuola.com&q='
};
var NewsSite={
    'baidu':'http://news.baidu.com/ns?&tn=uuola&from=news&cl=2&rn=20&ct=1&ie=utf-8&word=',
    'soso':'http://news.soso.com/n.q?sc=uuola&pid=web.news&ie=utf-8&ty=c&sd=0&w=',
    'bing':'http://cn.bing.com/news/search?qs=n&form=uuola&pq=&sc=8-6&sp=-1&sk=&q=',
    'youdao':'http://news.youdao.com/search?&start=0&length=10&ue=utf8&s=&tl=&keyfrom=uuola.com&q=',
    'sogou':'http://news.sogou.com/news?mode=1&p=&from=uuola.com&&query=',
    'jike':'http://news.jike.com/so?src=uuola.com&q='
};

var Mp3Site={
    'gougou':'http://mp3.gougou.com/search?from=uuola&id=0&search=',
    'baidu':'http://mp3.baidu.com/m?tn=uuola.com&ct=&lm=-1&ie=utf-8&word=',
    'soso':'http://cgi.music.soso.com/fcgi-bin/m.q?p=1&source=1&from=uuola.com&t=0&w=',
    'sogou':'http://mp3.sogou.com/music.so?class=1&pf=&w=02009900&st=&ac=1&sourcetype=uuola.com&p=40030200&dp=1&_asf=mp3.sogou.com&_ast=1349582583&query='
};

var VodSite={
    'baidu':'http://video.baidu.com/v?ie=utf-8&ct=301989888&rn=20&pn=0&db=0&s=0&fbl=800&word=',
    'soso':'http://video.soso.com/search/?ch=v.res.search&pid=v.search&ac=1&ie=utf-8&w=',
    'youku':'http://www.soku.com/v?from=uuola.com&keyword=',
    'bing':'http://cn.bing.com/videos/search?go=&qs=n&form=uuola.com&pq=&sc=8-2&sp=-1&sk=&q=',
    'youdao':'http://video.youdao.com/search?&ue=utf8&keyfrom=uuola.com&q=',
    'sogou':'http://v.sogou.com/v?p=&_asf=uuola.com&_ast=1349610750&sc=index&oq=&ri=0&sst0=1349610755387&query=',
    'jike':'http://video.jike.com/so?from=uuola.com&q='
};

var PicSite={
    'baidu':'http://image.baidu.com/i?ct=201326592&ie=utf-8&cl=2&nc=1&lm=-1&st=-1&tn=uuola.com&istype=2&fm=index&pv=&z=0&word=',
    'soso':'http://image.soso.com/image.cgi?sc=img&ie=utf-8&ac=0&ch=s.p.res.i&pid=p.res.i&w=',
    'bing':'http://cn.bing.com/images/search?go=&qs=n&form=uuola.com&pq=&sc=8-4&sp=-1&sk=&q=',
    'youdao':'http://image.youdao.com/search?keyfrom=image.result.top&q=',
    'sogou':'http://pic.sogou.com/pics?w=05009900&p=&_asf=pic.sogou.com&_ast=1349605437&sourcetype=uuola.com&query=',
    'jike':'http://image.jike.com/so?from=uuola.com&q='
};

var AskSite={
    'baidu':'http://zhidao.baidu.com/search?pn=0&ie=utf-8&rn=10&lm=0&fr=search&word=',
    'soso':'http://wenwen.soso.com/z/Search.e?from=uuola.com&ie=utf-8&search=%E6%90%9C%E7%B4%A2%E7%AD%94%E6%A1%88&w=&sp=S',
    'sohu':'http://wenda.sohu.com/search?from=uuola.com&w=&query=',
    'sogou':'http://zhishi.sogou.com/zhishi?_asf=uuola.com&_ast=1349615929&query='
};

var TieSite={
    'baidu':'http://tieba.baidu.com/f?ie=utf-8&kw=',
    'soso':'http://sobar.soso.com/n/'
};

var WenkuSite={
    'baidu':'http://wenku.baidu.com/search?lm=0&od=0&fr=uuola.com&word=',
    'sina':'http://ishare.iask.sina.com.cn/search.php?from=uuola.com&format=&key=',
    'it168':'http://wenku.it168.com/s?_9=&_8=',
    'docin':'http://www.docin.com/search.do?searchcat=2&searchType_banner=p&nkey='
};

var MapSite={
    'baidu':'http://map.baidu.com/?newmap=1&ie=utf-8&src=uuola.com&s=s%26wd%3D',
    'google':'http://ditu.google.cn/maps?src=uuola.com&q=',
    'soso':'http://map.soso.com/?ie=utf-8&src=uuola.com&w=',
    'sogou':'http://map.sogou.com/?lq='
};

var BuySite={
    'taobao':'http://s.taobao.com/search?from=uuola.com&q=',
    'tmall':'http://list.tmall.com/search_product.htm?from=uuola.com&q=',
    'jingdong':'http://search.360buy.com/Search?enc=utf-8&from=uuola.com&keyword=',
    'dangdang':'http://searchb.dangdang.com/?from=uuola.com&key=',
    'yihaodian':'http://search.yihaodian.com/s2/c0-0/k',
    'amazon':'http://www.amazon.cn/s/ref=nb_sb_noss?field-keywords=',
    'etao':'http://s.etao.com/search?from=uuola.com&q=',
    'qq':'http://shop.qq.com/search/index.html?from=uuola.com&q=',
    'suning':'http://search.suning.com/emall/search.do?from=uuola.com&keyword='
};

var BaikeSite={
    'baidu':'http://baike.baidu.com/search/word?from=uuola.com&pic=1&sug=1&enc=utf8&oq=&word=',
    'soso':'http://baike.soso.com/Search.e?ie=utf-8&src=uuola.com&sp=S',
    'hudong':'http://so.hudong.com/s/doc/',
    'wiki':'http://zh.wikipedia.org/w/index.php?ue=utf-8&ie=utf-8&from=uuola.com&search='
};

var FanyiSite={
    'baidu':'http://fanyi.baidu.com/#zh2en|',
    'google':'http://translate.google.cn/#zh-CN/en/',
    'youdao':'http://dict.youdao.com/search?keyfrom=uuola.com&q=',
    'iciba':'http://www.iciba.com/',
    'bing':'http://dict.bing.com.cn/#'
};

var JobSite={
    'zhaopin':'http://sou.zhaopin.com/jobs/searchresult.ashx?ref=uuola_com&sm=0&p=1&kw=',
    'qiancheng':'http://search.51job.com/jobsearch/search_result.php?ref=uuola_com&fromJs=1&jobarea=000000%2C00&district=000000&funtype=0000&industrytype=00&issuedate=9&providesalary=99&keywordtype=2&curr_page=1&lang=c&stype=2&postchannel=0000&workyear=99&cotype=99&degreefrom=99&jobterm=01&lonlat=0%2C0&radius=-1&ord_field=0&list_type=0&fromType=14&keyword='
};

function doWebSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/web_so.shtm').submit();
};

function doNewsSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/news_so.shtm').submit();
};

function doMp3Search(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/mp3_so.shtm').submit();
};

function doVodSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/vod_so.shtm').submit();
};

function doPicSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/pic_so.shtm').submit();
};

function doAskSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/ask_so.shtm').submit();
};

function doTieSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        alert('请输入帖吧名称.');
        return;
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/tie_so.shtm').submit();
};

function doWenkuSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/wenku_so.shtm').submit();
};

function doMapSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        alert('请输入地理名称.');
        return;
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/map_so.shtm').submit();
};

function doBuySearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        return;
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'taobao';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/buy_so.shtm').submit();
};

function doBaikeSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='互联网';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/baike_so.shtm').submit();
};

function doFanyiSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        kw='互联网';
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'baidu';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/fanyi_so.shtm').submit();
};

function doJobSearch(){
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        return;
    }
    var enc_kw = kw;
    var sel = ut.getselv('selsite');
    if(va.isnull(sel)){
        sel = 'qiancheng';
    }
    $('#J_q').val(enc_kw);
    $('#J_sel').val(sel);
    $('#sofrm').attr('action',def.ctx+'/index/job_so.shtm').submit();
};

function Delay(k,u,i){
    this.load=function(){
        var t = window.setTimeout(function(){
            $('#'+k).attr('src',u);
            clearTimeout(t);
        },600*i);
    };
};
function resize(stifr){
    var ia = stifr.split('-');
    var je;
    for(var i=0; i<ia.length ; i++){
        je = $('#'+ia[i]);
        var k=je.offset().top;
        k=k>0?k:25;
        je.height($(window).height()-k-6);
    }
};
function iframeResize(stifr){
    resize(stifr);
    $(window).resize(function(){
        resize(stifr);
    });
};

jQuery(function(){
    $('a').bind('focus',function(){
        if(this.blur){
            this.blur();
        };
    });
});

function repeatSearch(actName,selSite){
    var soUrl = 'http://www.uuola.com/index/'+actName+'.shtm?sel='+selSite+'&q=';
    var kw = $('#kw').val();
    if(va.isnull(kw)){
        return;
    }
    var enc_kw = ut.enc(kw);
    ut.gopage(soUrl+enc_kw);
};